package me.skyun.androidarch.home;

import android.support.v4.app.Fragment;

import me.skyun.androidarch.base.BaseTabActivity;

/**
 * Created by linyun on 16/11/15.
 */
public class MainActivity extends BaseTabActivity {

    private static final String[] TITLES = {"title 1", "title 2", "title 3", "title 4"};

    @Override
    protected Fragment getFragment(int position) {
        Fragment fragment;
        switch (position) {
            case 0:
                fragment = new MockFragment();
                break;
            case 1:
                fragment = new MockFragment();
                break;
            case 2:
                fragment = new MockFragment();
                break;
            case 3:
                fragment = new MockFragment();
                break;
            default:
                fragment = new MockFragment();
                break;
        }
        return fragment;
    }

    @Override
    protected int getTabCount() {
        return 4;
    }

    @Override
    protected CharSequence getPageTitle(int position) {
        return TITLES[position];
    }
}
